clear;
x = -6:0.1:6;
y = -6:0.1:6;
[X,Y]=meshgrid(x,y);
a = size(x);
Z = zeros(a(2),a(2));
corr = [0 0.8 -0.8 -0.8];
mu =[0 0;0 0;0 0;0 2];
for j=1:4
    for i=1:a(2)
        Z(:,i) = mvnpdf([X(:,i),Y(:,i)],mu(j,:),[1,corr(j);corr(j),1]);
    end
    subplot(2,2,j);
    mesh(X,Y,Z);
    title(strcat('\mu=[',num2str(mu(j,:)),'],','corr =',num2str(corr(j))));
end




